package cn.dogger.easyboot.init.initEntity;

import cn.dogger.easyboot.init.annotation.InitField;
import cn.dogger.easyboot.init.annotation.InitTable;
import cn.dogger.easyboot.init.enums.FieldTypeEnums;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 部门表
 *
 * @author dogger
 *  2022-07-27
 */
@Data
@InitTable(name = "sys_dept",remark = "部门表")
public class SysDept {

    @InitField(remark = "部门id",type = FieldTypeEnums.int_,name = "dept_id",keyFlag = true)
    private Long deptId;

    @InitField(remark = "父部门id",name="parent_id",type = FieldTypeEnums.int_)
    private Long parentId;

    @InitField(remark = "祖级列表",name = "ancestors",fieldLength = 50)
    private String ancestors;

    @InitField(remark = "部门名称",name = "dept_name",fieldLength = 50)
    private String deptName;

    @InitField(remark = "显示顺序",name = "order_num",type = FieldTypeEnums.int_)
    private Integer orderNum;

    @InitField(remark = "负责人",name = "leader",fieldLength = 50)
    private String leader;

    @InitField(remark = "联系电话",name = "phone",fieldLength = 50)
    private String phone;

    @InitField(remark = "邮箱",name = "email",fieldLength = 50)
    private String email;

    @InitField(remark = "部门状态（1正常 0停用）",name = "status",fieldLength = 50)
    private String status;

    @InitField(remark = "创建者",name = "create_by",fieldLength = 50)
    private String createBy;

    @InitField(remark = "创建时间",name = "create_time",type = FieldTypeEnums.datetime_)
    private LocalDateTime createTime;

    @InitField(remark = "更新者",name = "update_by",fieldLength = 50)
    private String updateBy;

    @InitField(remark = "更新时间",name  = "updateTime",type = FieldTypeEnums.datetime_)
    private LocalDateTime updateTime;

}